<!doctype html>
<html>

<head>
	<meta charset="UTF-8">
	<title>轴承CMS</title>
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<link href="__WX__/mui/css/mui.min.css" rel="stylesheet" />
	<link href="__WX__/css/iconfont.css" rel="stylesheet" />
</head>
<script src="__WX__/js/jquery.min.js"></script>
<style>
	ul li{
		list-style: none;
		padding:0;
		margin:0;
		border:0;
	}
	.xuan{
		border-radius: 15px;
		margin-right:10px;
	}
	.tijiao{
		width:330px;height:40px;text-align: center;line-height:42px;color:#fff;border-radius: 16px;margin:45px auto;
		background: -moz-linear-gradient(top, #524ABA 0%, #c6b1fc 100%);
		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#524ABA), color-stop(100%,#c6b1fc));
		background: -webkit-linear-gradient(top, #524ABA 0%,#c6b1fc 100%);
		background: -o-linear-gradient(top, #524ABA 0%,#c6b1fc 100%);
		background: -ms-linear-gradient(top, #524ABA 0%,#c6b1fc 100%);
		background: linear-gradient(to bottom, #524ABA 0%,#c6b1fc 100%);
	}
	.already_tijiao{
		width:330px;height:40px;text-align: center;line-height:42px;color:#fff;border-radius: 16px;margin:45px auto;
		background: -moz-linear-gradient(top, #524ABA 0%, #c6b1fc 100%);
		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#524ABA), color-stop(100%,#c6b1fc));
		background: -webkit-linear-gradient(top, #524ABA 0%,#c6b1fc 100%);
		background: -o-linear-gradient(top, #524ABA 0%,#c6b1fc 100%);
		background: -ms-linear-gradient(top, #524ABA 0%,#c6b1fc 100%);
		background: linear-gradient(to bottom, #524ABA 0%,#c6b1fc 100%);
	}
</style>
<body style="margin:0px;background-color:#fff;">
<div class="mui-content" style="background-color:#fff;">
	<header class="mui-bar mui-bar-nav">
	<a class="mui-icon mui-icon-left-nav mui-pull-left" style="color:#53caff" href="javascript:history.back(-1)"></a>
	<a class="mui-icon mui-icon-reply mui-pull-right"></a>
	<h1 class="mui-title">申请</h1>
	</header>
	<form id="applying">
		<div  style="width:90%;height:45px;margin-left:5%;margin-top: 60px;">
			<input type="hidden" name="tid" id="tid" value="{$tid}">
			<input type="hidden" name="tid" id="mid" value="{$mid}">
			<div  style="width:90%;height:45px;margin-left:5%;margin-top: 36px;">
				<h4 style="margin-left:5px;">提交人用户名</h4>
				<input type="text" value="{$register.username}" style="float:left;" readonly="true">
				<div></div>
			</div>
			<div  style="width:90%;height:45px;margin-left:5%;margin-top: 36px;">
				<h4 style="margin-left:5px;">提交人姓名</h4>
				<input type="text" value="{$register.name}" style="float:left;" readonly="true">
			</div>
			{volist name="arr_text" id="vo" key='i'}
			{volist name="arr_value" id="voo" key='j'}
			{if condition="$i == $j"}
			<div  style="width:90%;height:45px;margin-left:5%;margin-top: 36px;">
				{if condition="$voo != ''"}
				<h4 style="margin-left:5px;">{$vo}</h4>
				<input type="text" value="{$voo}" style="float:left;" readonly="true">
				<div></div>
				{/if}
			</div>
			{/if}
			{/volist}
			{/volist}
			{if condition="$status==1"}
			 <div class="tijiao" style="margin-top: 20%;">确认</div>
			{elseif condition="$status==2"/}
			  <div class="already_tijiao" style="margin-top: 20%;">已确认</div>
			{/if}
		</div>
	</form>
</div>
<script src="__WX__/mui/js/mui.min.js"></script>
<script>
    mui.init();
    mui('nav').on('tap','a',function(){
        window.top.location.href = this.href;
    });
</script>
</body>

<script>
    $(".xuan").click(function(){
        $(".xuan").removeClass("mui-btn-primary");
        $(this).addClass("mui-btn-primary");
    })
</script>
<script>
    $(".tijiao").click(function(){
        mui.confirm('确认？', null, function(event) {
            var index = event.index;
            if (index === 1) {
                $.ajax({
                    url:'confirm',
                    type:"post",
					data:{tid:$('#tid').val(),mid:$('#mid').val()},
                    success:function(res){
                        if(res == 200){
                            mui.alert('确认成功');
                            setTimeout(function(){ window.location.reload();}, 1500);
                        }else{
                            mui.alert(res.msg);
                        }
                    }
                });
            }
        });
    })
</script>
</html>